﻿@model Scrumrun.Models.Project

@{
    ViewBag.Title = "Edit";
}

<h3>@Model.Name</h3>
<h4>Edit</h4>

@*action="/Project/Edit/1" method="post"*@

@using (Html.BeginForm("Edit", "Project", FormMethod.Post, new { @Class = "form-horizontal" }))
{
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Project</legend>

        @Html.HiddenFor(model => model.ProjectId)
        @Html.HiddenFor(model => model.StartDate)

        <div class="control-group">
            @Html.LabelFor(model => model.Name, new { @Class = "control-label" })

            <div class="controls">
                @Html.EditorFor(model => model.Name)
                @Html.ValidationMessageFor(model => model.Name)
            </div>
        </div>

@*        <div class="control-group">
            @Html.LabelFor(model => model.StartDate, new { @Class = "control-label" })

            <div class="controls">
                @Html.EditorFor(model => model.StartDate)
                @Html.ValidationMessageFor(model => model.StartDate)
            </div>
        </div>*@

        <div class="control-group">
            @Html.LabelFor(model => model.EndDate, new { @Class = "control-label" })

            <div class="controls">
                @Html.EditorFor(model => model.EndDate)
                (Can not be less then today.)
                @Html.ValidationMessageFor(model => model.EndDate)
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.NumOfIterationDay, new { @Class = "control-label" })

            <div class="controls">
                @Html.EditorFor(model => model.NumOfIterationDay)
                (from 1 to 60 days)
                @Html.ValidationMessageFor(model => model.NumOfIterationDay)
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.WorkingDaysOnly, new { @Class = "control-label" })

            <div class="controls">
                @Html.EditorFor(model => model.WorkingDaysOnly)
                (Monday to friday)
                @Html.ValidationMessageFor(model => model.WorkingDaysOnly)
            </div>
        </div>

        <div class="control-group">
            <div class="controls">
                <input type="submit" value="Save" class="btn btn-warning" />
            </div>
        </div>

    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index", null, new {@class = "btn" })
</div>

@section Scripts {
   
}
